package com.nuoniu.sibanyun.entity.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

@Data
@ApiModel("生产订单_主表")
public class VProductionOrderMainSaveDto {


    @ApiModelProperty(value = "业务类型: 10自制生产 11委外加工 12其它")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty(value = "单据类型")
    @TableField("voucher_type")
    private Integer voucherType;

    @ApiModelProperty(value = "单据编号")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "生产日期")
    @TableField("voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate voucherDate;

    @ApiModelProperty(value = "单据状态")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "客户id")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "mrp运算结果ID")
    @TableField("mrp_result_id")
    private Long mrpResultId;

    @ApiModelProperty(value = "mrp编码")
    @TableField("mrp_code")
    private String mrpCode;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源日期")
    @TableField("source_voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    private List<VProductionOrderDetailSaveDto>  orderDetailList;


}
